package com.zatech.cgnci.project.base.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Arrays;
import java.util.Objects;

/**
 * <p>
 * 类 AlertInfoTypeEnum 的实现描述：消息提示枚举
 * </p>
 *
 * @author za-xiaojingjie
 * @version 2025/1/7 14:47
 * @since 2025/1/7 14:47
 */
@Getter
@AllArgsConstructor
public enum AlertInfoTypeEnum {
    ERROR("Error","错误"),
    WARNING("Warning","警告"),
    Block_Alert("blockAlert","阻断信息");
    public static AlertInfoTypeEnum getEnumByCode(String code) {
        return Arrays.stream(values()).filter(e -> Objects.equals(e.getCode(), code)).findAny().orElse(null);
    }
    private String code;
    private String descr;
  
    
    
}
